home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 July: Mac OS SDK / Dev.CD Jul 97 SDK1.toast / Development Kits (Disc 1) / PC Card Manager / CIncludes / MixedMode.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-13  |  18.4 KB  |  531 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        MixedMode.h
  3.  
  4.      Contains:    Mixed Mode Manager Interfaces.
  5.  
  6.      Version:    System 7.5
  7.  
  8.      DRI:        Bonnie Cohen
  9.  
  10.      Copyright:    © 1984-1996 by Apple Computer, Inc.
  11.                  All rights reserved.
  12.  
  13.      Warning:    *** APPLE INTERNAL USE ONLY ***
  14.                  This file may contain unreleased API's
  15.  
  16.      BuildInfo:    Built by:            SuperMario Build Daemon
  17.                  With Interfacer:    2.0d11   (PowerPC native)
  18.                  From:                MixedMode.i
  19.                      Revision:        41
  20.                      Dated:            3/15/96
  21.                      Last change by:    BC
  22.                      Last comment:    move procIndex enum to a system7 type define
  23.  
  24.      Bugs:        Report bugs to Radar component “System Interfaces”, “Latest”
  25.                  List the version information (from above) in the Problem Description.
  26.  
  27. */
  28. #ifndef __MIXEDMODE__
  29. #define __MIXEDMODE__
  30.  
  31. #ifndef __TYPES__
  32. #include <Types.h>
  33. #endif
  34.  
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38.  
  39. #if PRAGMA_IMPORT_SUPPORTED
  40. #pragma import on
  41. #endif
  42.  
  43. #if PRAGMA_ALIGN_SUPPORTED
  44. #pragma options align=mac68k
  45. #endif
  46.  
  47. #if FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE
  48. /* Mixed Mode constants */
  49. /* Current Routine Descriptor Version */
  50.  
  51. enum {
  52.     kRoutineDescriptorVersion    = 7
  53. };
  54.  
  55. /* MixedModeMagic Magic Cookie/Trap number */
  56.  
  57. enum {
  58.     _MixedModeMagic                = 0xAAFE
  59. };
  60.  
  61. /* Calling Conventions */
  62. typedef unsigned short CallingConventionType;
  63.  
  64. enum {
  65.     kPascalStackBased            = 0,
  66.     kCStackBased                = 1,
  67.     kRegisterBased                = 2,
  68.     kD0DispatchedPascalStackBased = 8,
  69.     kD1DispatchedPascalStackBased = 12,
  70.     kD0DispatchedCStackBased    = 9,
  71.     kStackDispatchedPascalStackBased = 14,
  72.     kThinkCStackBased            = 5
  73. };
  74.  
  75. /* ISA Types */
  76. typedef SInt8 ISAType;
  77.  
  78. enum {
  79.     kM68kISA                    = 0,
  80.     kPowerPCISA                    = 1
  81. };
  82.  
  83. /* RTA Types */
  84. typedef SInt8 RTAType;
  85.  
  86. enum {
  87.     kOld68kRTA                    = 0 << 4,
  88.     kPowerPCRTA                    = 0 << 4,
  89.     kCFM68kRTA                    = 1 << 4
  90. };
  91.  
  92. #if GENERATINGPOWERPC
  93. #define        GetCurrentISA()        ((ISAType) kPowerPCISA)
  94. #define        GetCurrentRTA()        ((RTAType) kPowerPCRTA)
  95. #else
  96. #define        GetCurrentISA()        ((ISAType) kM68kISA)
  97. #if GENERATINGCFM
  98. #define        GetCurrentRTA()        ((RTAType) kCFM68kRTA)
  99. #else
  100. #define        GetCurrentRTA()        ((RTAType) kOld68kRTA)
  101. #endif
  102. #endif
  103. #define        GetCurrentArchitecture()    (GetCurrentISA() | GetCurrentRTA())
  104. /* Constants for specifing 68k registers */
  105.  
  106. enum {
  107.     kRegisterD0                    = 0,
  108.     kRegisterD1                    = 1,
  109.     kRegisterD2                    = 2,
  110.     kRegisterD3                    = 3,
  111.     kRegisterD4                    = 8,
  112.     kRegisterD5                    = 9,
  113.     kRegisterD6                    = 10,
  114.     kRegisterD7                    = 11,
  115.     kRegisterA0                    = 4,
  116.     kRegisterA1                    = 5,
  117.     kRegisterA2                    = 6,
  118.     kRegisterA3                    = 7,
  119.     kRegisterA4                    = 12,
  120.     kRegisterA5                    = 13,
  121.     kRegisterA6                    = 14,                            /* A7 is the same as the PowerPC SP */
  122.     kCCRegisterCBit                = 16,
  123.     kCCRegisterVBit                = 17,
  124.     kCCRegisterZBit                = 18,
  125.     kCCRegisterNBit                = 19,
  126.     kCCRegisterXBit                = 20
  127. };
  128.  
  129. typedef unsigned short registerSelectorType;
  130. /* SizeCodes we use everywhere */
  131.  
  132. enum {
  133.     kNoByteCode                    = 0,
  134.     kOneByteCode                = 1,
  135.     kTwoByteCode                = 2,
  136.     kFourByteCode                = 3
  137. };
  138.  
  139. /* Mixed Mode Routine Records */
  140. typedef unsigned long ProcInfoType;
  141. /* Routine Flag Bits */
  142. typedef unsigned short RoutineFlagsType;
  143.  
  144. enum {
  145.     kProcDescriptorIsAbsolute    = 0x00,
  146.     kProcDescriptorIsRelative    = 0x01
  147. };
  148.  
  149.  
  150. enum {
  151.     kFragmentIsPrepared            = 0x00,
  152.     kFragmentNeedsPreparing        = 0x02
  153. };
  154.  
  155.  
  156. enum {
  157.     kUseCurrentISA                = 0x00,
  158.     kUseNativeISA                = 0x04
  159. };
  160.  
  161.  
  162. enum {
  163.     kPassSelector                = 0x00,
  164.     kDontPassSelector            = 0x08
  165. };
  166.  
  167.  
  168. enum {
  169.     kRoutineIsNotDispatchedDefaultRoutine = 0x00,
  170.     kRoutineIsDispatchedDefaultRoutine = 0x10
  171. };
  172.  
  173. #endif
  174. #if FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE
  175.  
  176. enum {
  177.     kProcDescriptorIsProcPtr    = 0x00,
  178.     kProcDescriptorIsIndex        = 0x20
  179. };
  180.  
  181. struct RoutineRecord {
  182.     ProcInfoType                     procInfo;                    /* calling conventions */
  183.     SInt8                             reserved1;                    /* Must be 0 */
  184.     ISAType                         ISA;                        /* Instruction Set Architecture */
  185.     RoutineFlagsType                 routineFlags;                /* Flags for each routine */
  186.     ProcPtr                         procDescriptor;                /* Where is the thing we’re calling? */
  187.     UInt32                             reserved2;                    /* Must be 0 */
  188.     UInt32                             selector;                    /* For dispatched routines, the selector */
  189. };
  190. typedef struct RoutineRecord RoutineRecord;
  191.  
  192. typedef RoutineRecord *RoutineRecordPtr;
  193. typedef RoutineRecordPtr *RoutineRecordHandle;
  194. /* Mixed Mode Routine Descriptors */
  195. /* Definitions of the Routine Descriptor Flag Bits */
  196. typedef UInt8 RDFlagsType;
  197.  
  198. enum {
  199.     kSelectorsAreNotIndexable    = 0x00,
  200.     kSelectorsAreIndexable        = 0x01
  201. };
  202.  
  203. /* Routine Descriptor Structure */
  204. struct RoutineDescriptor {
  205.     UInt16                             goMixedModeTrap;            /* Our A-Trap */
  206.     SInt8                             version;                    /* Current Routine Descriptor version */
  207.     RDFlagsType                     routineDescriptorFlags;        /* Routine Descriptor Flags */
  208.     UInt32                             reserved1;                    /* Unused, must be zero */
  209.     UInt8                             reserved2;                    /* Unused, must be zero */
  210.     UInt8                             selectorInfo;                /* If a dispatched routine, calling convention, else 0 */
  211.     UInt16                             routineCount;                /* Number of routines in this RD */
  212.     RoutineRecord                     routineRecords[1];            /* The individual routines */
  213. };
  214. typedef struct RoutineDescriptor RoutineDescriptor;
  215.  
  216. typedef RoutineDescriptor *RoutineDescriptorPtr;
  217. typedef RoutineDescriptorPtr *RoutineDescriptorHandle;
  218. #endif
  219. #if FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED
  220. /* Macros for building static Routine Descriptors */
  221.  
  222. /* A macro which creates a static instance of a non-dispatched routine descriptor */
  223. #define BUILD_ROUTINE_DESCRIPTOR(procInfo, procedure)                                 \
  224.     {                                                                                \
  225.         _MixedModeMagic,                            /* Mixed Mode A-Trap */         \
  226.         kRoutineDescriptorVersion,                    /* version */                    \
  227.         kSelectorsAreNotIndexable,                    /* RD Flags - not dispatched */    \
  228.         0,                                            /* reserved 1 */                \
  229.         0,                                            /* reserved 2 */                \
  230.         0,                                            /* selector info */                \
  231.         0,                                            /* number of routines */        \
  232.         {                                            /* It’s an array */                \
  233.             {                                        /* It’s a struct */                \
  234.                 (procInfo),                            /* the ProcInfo */                \
  235.                 0,                                    /* reserved */                    \
  236.                 GetCurrentArchitecture(),             /* ISA and RTA */                \
  237.                 kProcDescriptorIsAbsolute |            /* Flags - it’s absolute addr */\
  238.                 kFragmentIsPrepared |                /* It’s prepared */                \
  239.                 kUseNativeISA,                        /* Always use native ISA */        \
  240.                 (ProcPtr)(procedure),                /* the procedure */                \
  241.                 0,                                    /* reserved */                    \
  242.                 0                                    /* Not dispatched */            \
  243.             }                                                                        \
  244.         }                                                                            \
  245.     }
  246.  
  247. /* a macro which creates a static instance of a fat routine descriptor */
  248. #define BUILD_FAT_ROUTINE_DESCRIPTOR(m68kProcInfo, m68kProcPtr, powerPCProcInfo, powerPCProcPtr)  \
  249.     {                                                                                \
  250.         _MixedModeMagic,                            /* Mixed Mode A-Trap */         \
  251.         kRoutineDescriptorVersion,                    /* version */                    \
  252.         kSelectorsAreNotIndexable,                    /* RD Flags - not dispatched */    \
  253.         0,                                            /* reserved */                    \
  254.         0,                                            /* reserved */                    \
  255.         0,                                            /* reserved */                    \
  256.         1,                                            /* Array count */                \
  257.         {                                            /* It’s an array */                \
  258.             {                                        /* It’s a struct */                \
  259.                 (m68kProcInfo),                        /* the ProcInfo */                \
  260.                 0,                                    /* reserved */                    \
  261.                 kM68kISA |                            /* ISA */                        \
  262.                 kOld68kRTA,                            /* RTA */                        \
  263.                 kProcDescriptorIsAbsolute |            /* Flags - it’s absolute addr */\
  264.                 kUseCurrentISA,                        /* Use current ISA */            \
  265.                 (ProcPtr)(m68kProcPtr),                /* the procedure */                \
  266.                 0,                                    /* reserved */                    \
  267.                 0,                                    /* reserved */                    \
  268.             },                                                                        \
  269.             {                                        /* It’s a struct */                \
  270.                 (powerPCProcInfo),                    /* the ProcInfo */                \
  271.                 0,                                    /* reserved */                    \
  272.                 GetCurrentArchitecture(),             /* ISA and RTA */                \
  273.                 kProcDescriptorIsAbsolute |            /* Flags - it’s absolute addr */\
  274.                 kFragmentIsPrepared |                /* It’s prepared */                \
  275.                 kUseCurrentISA,                        /* Always use current ISA */    \
  276.                 (ProcPtr)(powerPCProcPtr),            /* the procedure */                \
  277.                 0,                                    /* reserved */                    \
  278.                 0                                    /* reserved */                    \
  279.             }                                                                        \
  280.         }                                                                            \
  281.     }
  282. #endif
  283. #if FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE
  284. /* Mixed Mode ProcInfos */
  285.  
  286. enum {
  287.                                                                 /* Calling Convention Offsets */
  288.     kCallingConventionWidth        = 4,
  289.     kCallingConventionPhase        = 0,
  290.     kCallingConventionMask        = 0x0F,                            /* Result Offsets */
  291.     kResultSizeWidth            = 2,
  292.     kResultSizePhase            = kCallingConventionWidth,
  293.     kResultSizeMask                = 0x30,                            /* Parameter offsets & widths */
  294.     kStackParameterWidth        = 2,
  295.     kStackParameterPhase        = (kCallingConventionWidth + kResultSizeWidth),
  296.     kStackParameterMask            = 0xFFFFFFC0,                    /* Register Result Location offsets & widths */
  297.     kRegisterResultLocationWidth = 5,
  298.     kRegisterResultLocationPhase = (kCallingConventionWidth + kResultSizeWidth), /* Register Parameter offsets & widths */
  299.     kRegisterParameterWidth        = 5,
  300.     kRegisterParameterPhase        = (kCallingConventionWidth + kResultSizeWidth + kRegisterResultLocationWidth),
  301.     kRegisterParameterMask        = 0x7FFFF800,
  302.     kRegisterParameterSizePhase    = 0,
  303.     kRegisterParameterSizeWidth    = 2,
  304.     kRegisterParameterWhichPhase = kRegisterParameterSizeWidth,
  305.     kRegisterParameterWhichWidth = 3,                            /* Dispatched Stack Routine Selector offsets & widths */
  306.     kDispatchedSelectorSizeWidth = 2,
  307.     kDispatchedSelectorSizePhase = (kCallingConventionWidth + kResultSizeWidth), /* Dispatched Stack Routine Parameter offsets */
  308.     kDispatchedParameterPhase    = (kCallingConventionWidth + kResultSizeWidth + kDispatchedSelectorSizeWidth), /* Special Case offsets & widths */
  309.     kSpecialCaseSelectorWidth    = 6,
  310.     kSpecialCaseSelectorPhase    = kCallingConventionWidth,
  311.     kSpecialCaseSelectorMask    = 0x03F0
  312. };
  313.  
  314. #endif
  315. #if FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE
  316.  
  317. enum {
  318.     kSpecialCase                = 0x000F                        /* (CallingConventionType) */
  319. };
  320.  
  321.  
  322. enum {
  323.                                                                 /* all of the special cases enumerated.  The selector field is 6 bits wide */
  324.     kSpecialCaseHighHook        = 0,
  325.     kSpecialCaseCaretHook        = 0,                            /* same as kSpecialCaseHighHook */
  326.     kSpecialCaseEOLHook            = 1,
  327.     kSpecialCaseWidthHook        = 2,
  328.     kSpecialCaseTextWidthHook    = 2,                            /* same as kSpecialCaseWidthHook */
  329.     kSpecialCaseNWidthHook        = 3,
  330.     kSpecialCaseDrawHook        = 4,
  331.     kSpecialCaseHitTestHook        = 5,
  332.     kSpecialCaseTEFindWord        = 6,
  333.     kSpecialCaseProtocolHandler    = 7,
  334.     kSpecialCaseSocketListener    = 8,
  335.     kSpecialCaseTERecalc        = 9,
  336.     kSpecialCaseTEDoText        = 10,
  337.     kSpecialCaseGNEFilterProc    = 11,
  338.     kSpecialCaseMBarHook        = 12
  339. };
  340.  
  341. /*
  342.     NOTES ON USING ROUTINE DESCRIPTOR FUNCTIONS
  343.     
  344.     When calling these routine from classic 68k code there are two possible intentions.
  345.  
  346.     The first is source compatibility with code ported to CFM (either PowerPC or 68k CFM). When
  347.     the code is compiled for CFM the functions create routine descriptors that can be used by
  348.     the mixed mode manager operating on that machine. When the code is compiled for classic 68k
  349.     these functions do nothing so that the code will run on Macintoshes that do not have a
  350.     mixed mode manager. The dual nature of these functions is achieved by turning the CFM calls
  351.     into "no-op" macros for classic 68k: You can put "NewRoutineDescriptor" in your source,
  352.     compile it for any runtime or instruction set architecture, and it will run correctly on the
  353.     intended runtime/instruction platform. All without source changes and/or conditional source.
  354.     
  355.     The other intention is for code that "knows" that it is executing as classic 68k runtime
  356.     and is specifically trying to call code of another architecture using mixed mode. Since the
  357.     routines were designed with classic <-> CFM source compatibility in mind this second case
  358.     is treated special. For classic 68k code to create routines descriptors for use by mixed mode
  359.     it must call the "Trap" versions of the routines (NewRoutineDescriptorTrap). These versions
  360.     are only available to classic 68k callers: rigging the interfaces to allow calling them
  361.     from CFM code will result in runtime failure because no shared library implements or exports
  362.     the functions.
  363.     
  364.  
  365.     This almost appears seamless until you consider "fat" routine descriptors and the advent of
  366.     CFM-68K. What does "fat" mean? CFM-68K is not emulated on PowerPC and PowerPC is not emulated
  367.     on CFM-68K. It makes no sense to create a routine descriptor having both a CFM-68K routine
  368.     and a PowerPC native routine pointer. Therefore "fat" is defined to be a mix of classic and
  369.     CFM for the hardware's native instruction set: on PowerPC fat is classic and PowerPC native,
  370.     on a 68k machine with CFM-68K installed fat is classic and CFM-68K.
  371.     
  372.     By definition fat routine descriptors are only constructed by code that is aware of the 
  373.     architecture it is executing as and that another architecture exists. Source compatibility
  374.     between code intented as pure classic and pure CFM is not an issue and so NewFatRoutineDescriptor
  375.     is not available when building pure classic code.
  376.     
  377.     NewFatRoutineDescriptorTrap is available to classic code on both PowerPC and CFM-68K. The
  378.     classic code can use the code fragment manager routine "FindSymbol" to obtain the address of 
  379.     a routine in a shared library and then construct a routine descriptor with both the CFM routine 
  380.     and classic    routine.
  381. */
  382. #if GENERATINGCFM
  383. extern pascal UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA);
  384.  
  385. extern pascal void DisposeRoutineDescriptor(UniversalProcPtr theProcPtr);
  386.  
  387. extern pascal UniversalProcPtr NewFatRoutineDescriptor(ProcPtr theM68kProc, ProcPtr thePowerPCProc, ProcInfoType theProcInfo);
  388.  
  389. #else
  390. extern pascal UniversalProcPtr NewRoutineDescriptorTrap(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)
  391.  TWOWORDINLINE(0x7000, 0xAA59);
  392.  
  393. extern pascal void DisposeRoutineDescriptorTrap(UniversalProcPtr theProcPtr)
  394.  TWOWORDINLINE(0x7001, 0xAA59);
  395.  
  396. extern pascal UniversalProcPtr NewFatRoutineDescriptorTrap(ProcPtr theM68kProc, ProcPtr thePowerPCProc, ProcInfoType theProcInfo)
  397.  TWOWORDINLINE(0x7002, 0xAA59);
  398.  
  399. #define DisposeRoutineDescriptor(theProcPtr)
  400. #define NewRoutineDescriptor(theProc, theProcInfo, theISA) ((UniversalProcPtr)theProc)
  401. /* Note that the call to NewFatRoutineDescriptor is undefined when GENERATINGCFM is false. */
  402. #endif
  403. #if GENERATINGCFM
  404. /*
  405.  CallUniversalProc is only implemented in shared libraries on 68k and PowerPC, it is now
  406.  conditionalize with GENERATINGCFM.  This will catch accidental calls from classic 68K code
  407.  that previously only showed up as linker errors.
  408. */
  409. extern long CallUniversalProc(UniversalProcPtr theProcPtr, ProcInfoType procInfo, ...);
  410.  
  411. extern long CallOSTrapUniversalProc(UniversalProcPtr theProcPtr, ProcInfoType procInfo, ...);
  412.  
  413. #endif
  414. #endif
  415. /* Macros for building ProcInfos */
  416. /*
  417.  * * * * * * * * * * * * * * 
  418.  *    SIZE_CODE -     Return the size code for an object, given its size in bytes.
  419.  *        size - size of an object in bytes
  420. */
  421. #define SIZE_CODE(size) \
  422.     (((size) == 4) ? kFourByteCode : (((size) == 2) ? kTwoByteCode : (((size) == 1) ? kOneByteCode : 0)))
  423. /*
  424.  * * * * * * * * * * * * * * 
  425.  *    RESULT_SIZE -     Return the result field of a ProcInfo, given the return object’s size.
  426.  *                     This is the same for all ProcInfos
  427.  *        sizeCode - size code
  428. */
  429. #define RESULT_SIZE(sizeCode) \
  430.     ((ProcInfoType)(sizeCode) << kResultSizePhase)
  431. /*
  432.  * * * * * * * * * * * * * * 
  433.  *    STACK_ROUTINE_PARAMETER -    Return a parameter field of a ProcInfo, for a simple,
  434.  *                                non-dispatched, stack based routine.
  435.  *        whichParam - which parameter
  436.  *        sizeCode - size code
  437. */
  438. #define STACK_ROUTINE_PARAMETER(whichParam, sizeCode) \
  439.     ((ProcInfoType)(sizeCode) << (kStackParameterPhase + (((whichParam) - 1) * kStackParameterWidth)))
  440. /*
  441.  * * * * * * * * * * * * * * 
  442.  *    DISPATCHED_STACK_ROUTINE_PARAMETER -    Return a parameter field of a ProcInfo, for 
  443.  *                                            a dispatched, stack based routine.  The same
  444.  *                                            macro is used regardless of the type of
  445.  *                                            dispatching.
  446.  *        whichParam - which parameter
  447.  *        sizeCode - size code
  448. */
  449. #define DISPATCHED_STACK_ROUTINE_PARAMETER(whichParam, sizeCode) \
  450.     ((ProcInfoType)(sizeCode) << (kDispatchedParameterPhase + (((whichParam) - 1) * kStackParameterWidth)))
  451. /*
  452.  * * * * * * * * * * * * * * 
  453.  *    DISPATCHED_STACK_ROUTINE_SELECTOR_SIZE -    Return a the selector size field of a ProcInfo
  454.  *                                                for a dispatched, stack based routine.  The
  455.  *                                                same macro is used regardless of the type of
  456.  *                                                dispatching.
  457.  *        sizeCode - size code 
  458. */
  459. #define DISPATCHED_STACK_ROUTINE_SELECTOR_SIZE(sizeCode) \
  460.     ((ProcInfoType)(sizeCode) << kDispatchedSelectorSizePhase)
  461. /*
  462.  * * * * * * * * * * * * * * 
  463.  *    REGISTER_RESULT_LOCATION -        Return the Result Location field of a ProcInfo, 
  464.  *                                    given the location.
  465.  *        whichReg - which register
  466. */
  467. #define REGISTER_RESULT_LOCATION(whichReg) \
  468.     ((ProcInfoType)(whichReg) << kRegisterResultLocationPhase)
  469. /*
  470.  * * * * * * * * * * * * * * 
  471.  *    REGISTER_ROUTINE_PARAMETER -    Return a parameter field of a ProcInfo for a 
  472.  *                                    register based routine.
  473. */
  474. #define REGISTER_ROUTINE_PARAMETER(whichParam, whichReg, sizeCode) \
  475.     ((((ProcInfoType)(sizeCode) << kRegisterParameterSizePhase) | ((ProcInfoType)(whichReg) << kRegisterParameterWhichPhase)) << \
  476.             (kRegisterParameterPhase + (((whichParam) - 1) * kRegisterParameterWidth)))
  477. /*
  478.  * * * * * * * * * * * * * * 
  479.  *
  480.  *    SPECIAL_CASE_PROCINFO -     Returns the procInfo constant for the following special cases:
  481.  *    
  482.  *        High Hook & Caret Hook -  (see I-379)
  483.  *            C calling conventions, Rect on stack, pointer in A3, no return value
  484.  *        EOL Hook - (see VI-15-26)
  485.  *            Register-based; inputs in D0, A3, A4; 
  486.  *            output is Z flag of status register
  487.  *        Width Hook - (see VI-15-27)
  488.  *            Register-based; inputs in D0, D1, A0, A3, A4; output in D1 
  489.  *        NWidth Hook - (see VI-15-27)
  490.  *            Register-based; inputs in D0, D1, D2, A0, A2, A3, A4; output in D1 
  491.  *        TextWidthHook - (see VI-15-28)
  492.  *            Register-based; inputs in D0, D1, A0, A3, A4; output in D1 
  493.  *        DrawHook - (see VI-15-28)
  494.  *            Register-based; inputs in D0, D1, A0, A3, A4; no output
  495.  *        HitTestHook - (See VI-15-29)
  496.  *            Register-based; inputs in D0, D1, D2, A0, A3, A4; outputs in D0, D1, D2
  497.  *        FindWord -  (see VI-15-30)
  498.  *            Register-based; inputs in D0, D2, A3, A4; outputs in D0, D1
  499.  *        ADBRoutines - (see V-371)
  500.  *            Register-based; inputs in A0, A1, A2, D0; no outputs
  501.  *        ProtocolHandler - (see II-326)
  502.  *            Register-based; inputs in A0, A1, A2, A3, A4, D1.w; output in Z 
  503.  *        SocketListener - (see II-329)
  504.  *            Register-based; inputs in A0, A1, A2, A3, A4, D0.b, D1.w; output in Z 
  505.  *        Reclac - (see I-391)
  506.  *            Register-based; inputs in A3, D7; outputs in D2, D3, D4
  507.  *        DoText - (see I-391)
  508.  *            Register-based; inputs in A3, D3, D4, D7; outputs in A0, D0
  509.  *        GNEFilterProc - (see tech note 85)
  510.  *            Register & Stack Based; inputs in A1, D0 & on the stack; outputs on the stack
  511.  *        MenuBarHook - (see I-356)
  512.  *            Register & Stack Based; input on the stack; output in D0
  513. */
  514. #define SPECIAL_CASE_PROCINFO(specialCaseCode)            \
  515.         (kSpecialCase | ((ProcInfoType)(specialCaseCode) << 4))
  516.  
  517. #if PRAGMA_ALIGN_SUPPORTED
  518. #pragma options align=reset
  519. #endif
  520.  
  521. #if PRAGMA_IMPORT_SUPPORTED
  522. #pragma import off
  523. #endif
  524.  
  525. #ifdef __cplusplus
  526. }
  527. #endif
  528.  
  529. #endif /* __MIXEDMODE__ */
  530.  
  531.